
class CountryEntity{
  int? _code;
  List<Continent>? _data;
  String? _message;

  CountryEntity({int? code,List<Continent>? data,String? message}){
    this._code = code;
    this._data = data;
    this._message = message;
  }

  int? get code => _code;
  set setCode(int code)=>_code = code;
  String? get message => _message;
  set setMessage(String message) => _message = message;
  List<Continent>? get data =>_data;
  set getData(List<Continent> data) => _data = data;
  CountryEntity.fromJson(Map<String,dynamic> json){

    _code = json['code'];
    if (json['data'] != null) {
      _data = [];
      json['data'].forEach((v) {
        _data!.add( Continent.fromJson(v));
      });
    }
    _message = json['message'];

  }

  Map<String,dynamic> toJson(){
    final Map<String,dynamic> data = new Map<String,dynamic>();
    data['code'] = this._code;
    data['message'] = this._message;
    if(data['data'] !=null){
      data['data'] = this._data!.map((v) => v.toJson()).toList();
    }

    return data;
  }
}

class Continent {

  int? _continentId;
  String? _name;
  List<CountryData>? _countryList;

  Continent({int? continentId,List<CountryData>? countryList,String? name}){
    this._continentId = continentId;
    this._countryList = countryList;
    this._name = name;
  }

  int? get continentId => _continentId;
  set setContinentId(int continentId)=>_continentId = continentId;
  String? get name => _name;
  set setName(String name) => _name = name;
  List<CountryData>? get countryList =>_countryList;
  set getCountryList(List<CountryData> countryList) => _countryList = countryList;

  Continent.fromJson(Map<String,dynamic> json){

    _continentId = json['continent_Id'];
    if (json['Countrys'] != null) {
      _countryList = [];
      json['Countrys'].forEach((v) {
        _countryList!.add( CountryData.fromJson(v));
      });
    }
    _name = json['name'];

  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this._countryList != null) {
      data['Countrys'] = this._countryList!.map((v) => v.toJson()).toList();
    }
      data['continent_Id'] = this._continentId;
      data['name'] = this._name;
    return data;
  }


}

class CountryData {

  int? _id;
  String? _name;
  List<Time>? _timerList;

  CountryData({int? id,int? continentId,String? name,List<Time>? timerList }){
    this._id = id;
    this._name = name;
    this._timerList = timerList;
  }

  int? get id => _id;
  set setId(int id)=>_id = id;
  String? get name => _name;
  set setName(String name) => _name = name;
  List<Time>? get timerList => _timerList;
  set setTimerList(List<Time> timerList) => _timerList = timerList;


  CountryData.fromJson(Map<String,dynamic> json){

    _id = json['id'];
    _name = json['name'];
    if(json['Times']!=null){
      _timerList = [];
      json['Times'].forEach((v)=>{
        _timerList!.add(Time.fromJson(v))
      });
    }

  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this._id;
    data['name'] = this._name;
    data['Times'] = this._timerList;
    if(_timerList != null){
      data['Times'] = _timerList!.map((e) => e.toJson()).toList();
    }
    return data;
  }


}

class Time{
  int? _countryId;
  int? _timeId;
  String? _timeTiming;
  String? _timeContent;
  String? _timeTitle;
  String? _timeImage;


  Time({int? countryId,int? timeId,String? timeTiming,String? timeContent,String? timeTitle,String? timeImage }){
    this._countryId = countryId;
    this._timeId = timeId;
    this._timeTiming = timeTiming;
    this._timeContent = timeContent;
    this._timeTitle = timeTitle;
    this._timeImage = timeImage;
  }

  int? get countryId => _countryId;
  set setCountryId(int countryId)=>_countryId = countryId;
  int? get timeId => _timeId;
  set setTimeId(int timeId)=> _timeId = timeId;
  String? get timeTiming => _timeTiming;
  set setTimeTiming(String timeTiming) => _timeTiming = timeTiming;
  String? get timeContent => _timeContent;
  set setTimeContent(String timeContent)=>_timeContent = timeContent;
  String? get timeTitle => _timeTitle;
  set setTimeTitle(String timeTitle)=>_timeTitle = timeTitle;
  String? get timeImage => _timeImage;
  set setTimeImage(String timeImage) => _timeImage = timeImage;

  Time.fromJson(Map<String,dynamic> json){

    _countryId = json['countryId'];
    _timeId = json['time_Id'];
    _timeTiming = json['time_Timing'];
    _timeContent = json['time_Content'];
    _timeTitle = json['time_Title'];
    _timeImage = json['time_Image'];

  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['countryId'] = this._countryId;
    data['time_Id'] = this._timeId;
    data['time_Timing'] = this._timeTiming;
    data['time_Content'] = this._timeContent;
    data['time_Title'] = this._timeTitle;
    data['time_Image'] = this._timeImage;
    return data;
  }

}

class CountryPage{

  int _thinkPage = 0;
  int _thinkCount = 6;
  bool _canThink = true;

  int get thinkPage => _thinkPage;
  set setThinkPage(int thinkPage) => _thinkPage = thinkPage;
  int get thinkCount => _thinkCount;
  set setThinkCount(int thinkCount) => _thinkCount = thinkCount;
  bool get canThink => _canThink;
  set setCanThink(bool canThink) => _canThink = canThink;


}